﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.DomainObjects;

namespace AutomotivePricingModel.ProductionModels
{
    public partial class ProductionModel : KeyedDomainObjectBase<Guid, ProductionModel>
    {
        private Nullable<Guid> m_ParentBrand;
        private string m_ModelName;

        public ProductionModel()
        {
            m_Key = Guid.NewGuid();
            m_ParentBrand = null;
            m_ModelName = string.Empty;
        }

        public Nullable<Guid> ParentBrand
        {
            get { return m_ParentBrand; }
            set { m_ParentBrand = value; }
        }

        public string ModelName
        {
            get { return m_ModelName; }
            set { m_ModelName = value; }
        }

        #region DomainObject Methods

        public override ProductionModel Copy()
        {
            ProductionModel copy = new ProductionModel();
            CopyTo(copy);
            return copy;
        }

        public override void CopyTo(ProductionModel otherObject)
        {
            if (otherObject.m_Key != m_Key)
            { otherObject.m_Key = m_Key; }
            if (otherObject.m_ParentBrand != m_ParentBrand)
            { otherObject.m_ParentBrand = m_ParentBrand; }
            if (otherObject.m_ModelName != m_ModelName)
            { otherObject.m_ModelName = m_ModelName; }
        }

        public override bool Equals(ProductionModel otherObject)
        {
            if (otherObject.m_Key != m_Key)
            { return false; }
            if (otherObject.m_ParentBrand != m_ParentBrand)
            { return false; }
            if (otherObject.m_ModelName != m_ModelName)
            { return false; }
            return true;
        }

        #endregion
    }
}